<?php defined('_JEXEC') or die('Restricted access'); 
$editor =& JFactory::getEditor();
?>
<h1><?php JText::printf("EDIT_EVENT") ?></h1>
<form action="<?php echo $this->baseurl ?>/index.php" method="post">
<table>
	<tr>
		<td><?php JText::printf("DATE"); ?></td>
		<td><?php echo JHTML::date($this->event->date); ?></td>
	</tr>
	<tr>
		<td><?php JText::printf("HEAD_CHEF"); ?></td>
		<td><input class="inputbox" type="text" name="organiser_description" value="<?php echo $this->event->organiser_description ?>"/></td>
	</tr>
	<?php /*
	<tr>
		<td><?php JText::printf("CLOSING_DATE"); ?></td>
		<td>
			<input class="inputbox" type="text" name="closing_date" id="closing_date" value="<?php echo $this->event->closing_date ?>"/>
			<?php JHTML::calendar($this->event->closing_date, "closing_date", "closing_date", "%Y-%m-%d") ?>
		</td>
	</tr>
	*/ ?>
	<tr>
		<td><?php JText::printf("DESCRIPTION"); ?></td>
		<td><?php echo $editor->display( "description_html", $this->event->description_html , "100%", "150", "40", "5" ); ?></td>
	</tr>
	<tr>
		<td><?php JText::printf("STATUS"); ?></td>
		<td>
			<?php
			if($this->event->status <= CMeals::STATUS_PLANNING) {
				?>
				<input type="radio" name="status" value="<?php echo CMeals::STATUS_PLANNING ?>" checked><?php JText::printf("STATUS_PLANNING") ?></input>
				<br/>
				<?php 
			} 
			if($this->event->status <= CMeals::STATUS_CLOSED) {
				?>
				<input type="radio" name="status" value="<?php echo CMeals::STATUS_OPEN ?>" <?php if($this->event->status == CMeals::STATUS_OPEN) echo "checked"; ?>><?php JText::printf("STATUS_OPEN") ?></input>
				<br/>
				<?php 
				if($this->event->status == CMeals::STATUS_OPEN) {
					?>
					<input type="radio" name="status" value="<?php echo CMeals::STATUS_CLOSED ?>" <?php if($this->event->status == CMeals::STATUS_CLOSED) echo "checked"; ?>><?php JText::printf("STATUS_CLOSED") ?></input>
					<?php
				}
				?>
				<?php 
			} 
			?>
		</td>
	</tr>
	<tr>
		<td><?php JText::printf("ACCOUNTANT"); ?></td>
		<td><input class="inputbox" type="text" name="group_accountant_description" value="<?php echo $this->eventGroup->accountant_description ?>"/></td>
	</tr>
	<tr>
		<td><?php JText::printf("GROUP_DESCRIPTION"); ?></td>
		<td><?php echo $editor->display( "group_description_html", $this->eventGroup->description_html , "100%", "150", "40", "5" ); ?></td>
	</tr>
</table>
<button type="submit"><?php JText::printf("SAVE"); ?></button>
<button type="button" onclick="this.form.task.value='cancel';this.form.submit()"><?php JText::printf("CANCEL"); ?></button>
<input type="hidden" name="option" value="<?php echo $this->option; ?>" />
<input type="hidden" name="view" value="editevent" />
<input type="hidden" name="task" value="save" />
<input type="hidden" name="event_id" value="<?php echo $this->event->id; ?>" />
<input type="hidden" name="group_id" value="<?php echo $this->event->group_id; ?>" />
</form>